package com.example.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.example.enums.HotBusinessEnum;
import com.example.utils.HotKeyUtils;

import java.io.Serializable;

/**
 * 业务聚合
 *
 * @version [V2.0]
 * @package com.example.model;
 * @description:[用一句话描述该文件做什么]
 * @author: [zhuben]
 * @date: [2024-02-02 11:30]
 * @copyright: 2024 echovin.com
 */
@TableName("hot_key")
public class HotKeyModel implements Serializable {
    /**
     * 主键
     */
    @TableId("id")
    private String id;

    /**
     * 热词类型
     * @see HotBusinessEnum
     */
    @TableField("type")
    private String businessType;

    /**
     * 热词主键
     */
    @TableField("business_id")
    private String businessId;

    /**
     * 热度值
     */
    @TableField("score")
    @Version
    private Long score = 0L;

    /**
     * 热度key
     */
    @TableField("hot_key")
    private String hotKey;

    @TableField("staff_id")
    private String staffId;

    @TableField("dept_id")
    private String deptId;

    @TableField("ward_id")
    private String wardId;

    @TableField("hospital_id")
    private String hospitalId;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public Long getScore() {
        return score;
    }

    public void setScore(Long score) {
        this.score = score;
    }

    public String getHotKey() {
        return new HotKeyUtils().buildHotKeyStr(this.businessType, this.staffId, this.deptId, this.wardId, this.hospitalId);
    }

    public void setHotKey(String hotKey) {
        this.hotKey = hotKey;
    }

    public String getStaffId() {
        return staffId;
    }

    public void setStaffId(String staffId) {
        this.staffId = staffId;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getWardId() {
        return wardId;
    }

    public void setWardId(String wardId) {
        this.wardId = wardId;
    }

    public String getHospitalId() {
        return hospitalId;
    }

    public void setHospitalId(String hospitalId) {
        this.hospitalId = hospitalId;
    }
}
